<!doctype html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="语法,Markdown," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="前言本博客采用的是markdown语法书写，所以打算先学习下markdown语法，顺便记录一下，加深一下印象。">
<meta property="og:type" content="article">
<meta property="og:title" content="Markdown语法">
<meta property="og:url" content="http://jieminblog.tk/2017/03/06/Markdown语法/index.html">
<meta property="og:site_name" content="jiemin's Blog">
<meta property="og:description" content="前言本博客采用的是markdown语法书写，所以打算先学习下markdown语法，顺便记录一下，加深一下印象。">
<meta property="og:image" content="http://omdsjtsd2.bkt.clouddn.com/17-3-6/75122041-file_1488783144726_6716.jpg">
<meta property="og:updated_time" content="2017-03-07T08:57:38.947Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Markdown语法">
<meta name="twitter:description" content="前言本博客采用的是markdown语法书写，所以打算先学习下markdown语法，顺便记录一下，加深一下印象。">
<meta name="twitter:image" content="http://omdsjtsd2.bkt.clouddn.com/17-3-6/75122041-file_1488783144726_6716.jpg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://jieminblog.tk/2017/03/06/Markdown语法/"/>





  <title> Markdown语法 | jiemin's Blog </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  














  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">jiemin's Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">本来无一物，何处惹尘埃</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="http://jieminblog.tk/2017/03/06/Markdown语法/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="我爱的乌托邦">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/uploads/touxiang.jpeg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="jiemin's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                Markdown语法
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-03-06T07:37:46+08:00">
                2017-03-06
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>本博客采用的是markdown语法书写，所以打算先学习下markdown语法，顺便记录一下，加深一下印象。<br><a id="more"></a></p>
<h1 id="Markdown语法规则"><a href="#Markdown语法规则" class="headerlink" title="Markdown语法规则"></a>Markdown语法规则</h1><h2 id="标题"><a href="#标题" class="headerlink" title="标题"></a>标题</h2><p>在Markdown中,如果一段文字被定义为标题，只要在这段文字前加<code>#</code>号就行。</p>
<p><code># 一级标题</code></p>
<p><code># 二级标题</code></p>
<p><code># 三级标题</code></p>
<p>以此类推，总共六级标题，需要注意的是在#与文字之间需要有空格。</p>
<h2 id="列表"><a href="#列表" class="headerlink" title="列表"></a>列表</h2><p>列表分为有序列表和无序列表。在Markdown中，只要在文字前加<code>-</code>或者<code>*</code>就可变成无序列表。而有序列表则直接在文字前加<code>1.</code> <code>2.</code> <code>3.</code>符号和文字之间加上一个字符的空格</p>
<p><code>- 第一</code></p>
<p><code>- 第二</code></p>
<p><code>- 第三</code></p>
<p><strong>效果</strong></p>
<ul>
<li>第一</li>
<li>第二</li>
<li>第三</li>
</ul>
<p><code>1. 第一</code></p>
<p><code>2. 第二</code></p>
<p><code>3. 第三</code></p>
<p><strong>效果</strong></p>
<ol>
<li>第一</li>
<li>第二</li>
<li>第三</li>
</ol>
<h2 id="引用"><a href="#引用" class="headerlink" title="引用"></a>引用</h2><p>如果你需要引用一段别处的句子，那么就要用引用格式。引用格式只需要在文本前加入<code>&gt;</code>这种尖括号(大于号)即可</p>
<p><code>&gt; 这是段引用</code></p>
<p><strong>效果</strong></p>
<blockquote>
<p>这是段引用</p>
</blockquote>
<h2 id="图片与链接"><a href="#图片与链接" class="headerlink" title="图片与链接"></a>图片与链接</h2><p>插入链接与插入图片的语法很像，区别在于一个<code>!</code></p>
<p>图片格式为<code>![](http://omdsjtsd2.bkt.clouddn.com/17-3-6/75122041-file_1488783144726_6716.jpg)</code></p>
<p><strong>效果</strong></p>
<p><img src="http://omdsjtsd2.bkt.clouddn.com/17-3-6/75122041-file_1488783144726_6716.jpg" alt=""></p>
<p>链接格式为<code>[百度](www.baidu.com)</code></p>
<p><strong>效果</strong></p>
<p><a href="www.baidu.com">百度</a></p>
<p><strong>注</strong>: 插入图片的地址需要图床，我这里使用的是<a href="http://www.yotuku.cn/" target="_blank" rel="external">极简图床</a>。</p>
<h2 id="粗体与斜体"><a href="#粗体与斜体" class="headerlink" title="粗体与斜体"></a>粗体与斜体</h2><p>使用两个<code>*</code>包含一段文本就是粗体的语法，用一个<code>*</code>包含一段文本就是斜体的语法。</p>
<p><code>**这是粗体**</code></p>
<p><strong>效果</strong></p>
<p><strong>这是粗体</strong></p>
<p><code>*这是斜体*</code></p>
<p><strong>效果</strong></p>
<p><em>这是斜体</em></p>
<h2 id="表格"><a href="#表格" class="headerlink" title="表格"></a>表格</h2><p>例子</p>
<figure class="highlight gherkin"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">|<span class="string">学号</span>|<span class="string">姓名</span>|<span class="string">性别</span>|</div><div class="line">|<span class="string">---</span>|<span class="string">:---:</span>|<span class="string">:----:</span>|</div><div class="line">|<span class="string">1</span>|<span class="string">张三</span>|<span class="string">男</span>|</div><div class="line">|<span class="string">2</span>|<span class="string">李四</span>|<span class="string">男</span>|</div><div class="line">|<span class="string">3</span>|<span class="string">韩梅</span>|<span class="string">女</span>|</div></pre></td></tr></table></figure>
<p><strong>效果</strong></p>
<table>
<thead>
<tr>
<th style="text-align:center">学号</th>
<th style="text-align:center">姓名</th>
<th style="text-align:center">性别</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">1</td>
<td style="text-align:center">张三</td>
<td style="text-align:center">男</td>
</tr>
<tr>
<td style="text-align:center">2</td>
<td style="text-align:center">李四</td>
<td style="text-align:center">男</td>
</tr>
<tr>
<td style="text-align:center">3</td>
<td style="text-align:center">韩梅</td>
<td style="text-align:center">女</td>
</tr>
</tbody>
</table>
<h2 id="代码框"><a href="#代码框" class="headerlink" title="代码框"></a>代码框</h2><p>使用两个`把中间的代码包裹起来</p>
<h2 id="分割线"><a href="#分割线" class="headerlink" title="分割线"></a>分割线</h2><p>分割线使用三个<code>*</code>即可</p>
<p><strong>效果</strong></p>
<hr>
<h1 id="结束语"><a href="#结束语" class="headerlink" title="结束语"></a>结束语</h1><blockquote>
<p>到这里，Markdown 的基本语法在日常的使用中基本就没什么大问题了，只要多加练习，配合好用的工具，写起东西来肯定会行云流水。</p>
</blockquote>
<p><strong>参考资料</strong></p>
<p><a href="http://www.jianshu.com/p/1e402922ee32/" target="_blank" rel="external">Markdown——入门指南</a></p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/语法/" rel="tag"># 语法</a>
          
            <a href="/tags/Markdown/" rel="tag"># Markdown</a>
          
        </div>
      

      
        
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/03/06/个人博客成立啦！/" rel="next" title="个人博客成立啦！">
                <i class="fa fa-chevron-left"></i> 个人博客成立啦！
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/03/07/Centos7下搭建openvpn/" rel="prev" title="Centos7下搭建openvpn">
                Centos7下搭建openvpn <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>

          
          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/uploads/touxiang.jpeg"
               alt="我爱的乌托邦" />
          <p class="site-author-name" itemprop="name">我爱的乌托邦</p>
           
              <p class="site-description motion-element" itemprop="description"></p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">17</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">15</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#前言"><span class="nav-number">1.</span> <span class="nav-text">前言</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Markdown语法规则"><span class="nav-number">2.</span> <span class="nav-text">Markdown语法规则</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#标题"><span class="nav-number">2.1.</span> <span class="nav-text">标题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#列表"><span class="nav-number">2.2.</span> <span class="nav-text">列表</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#引用"><span class="nav-number">2.3.</span> <span class="nav-text">引用</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#图片与链接"><span class="nav-number">2.4.</span> <span class="nav-text">图片与链接</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#粗体与斜体"><span class="nav-number">2.5.</span> <span class="nav-text">粗体与斜体</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#表格"><span class="nav-number">2.6.</span> <span class="nav-text">表格</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#代码框"><span class="nav-number">2.7.</span> <span class="nav-text">代码框</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#分割线"><span class="nav-number">2.8.</span> <span class="nav-text">分割线</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#结束语"><span class="nav-number">3.</span> <span class="nav-text">结束语</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">我爱的乌托邦</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Pisces
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    
    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.0"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	





  





  





  



  
  

  

  

  

  


  

</body>
</html>
